| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

Sampler.h
1 // Sampler.h
3 //
5
6 namespace nkGraphics
7 {
13 class Sampler : public Resource, public nkExport::Exportable
14 {
15 public :
16
17 // Destructor
21 virtual ~Sampler () ;
22
23 // Getters
27 virtual FILTER getFiltering () const = 0 ;
31 virtual TEXTURE_ADDRESS_MODE getAddressModeU () const = 0 ;
35 virtual TEXTURE_ADDRESS_MODE getAddressModeV () const = 0 ;
39 virtual TEXTURE_ADDRESS_MODE getAddressModeW () const = 0 ;
43 virtual COMPARISON_FUNCTION getComparisonFunction () const = 0 ;
47 virtual float getMipBias () const = 0 ;
51 virtual unsigned int getMaxAnisotropy () const = 0 ;
55 virtual float getMinLodLevel () const = 0 ;
59 virtual float getMaxLodLevel () const = 0 ;
63 virtual float getBorderColorR () const = 0 ;
67 virtual float getBorderColorG () const = 0 ;
71 virtual float getBorderColorB () const = 0 ;
75 virtual float getBorderColorA () const = 0 ;
79 nkMemory::StringView getFilteringAsString () const ;
83 nkMemory::StringView getAddressModeUAsString () const ;
87 nkMemory::StringView getAddressModeVAsString () const ;
91 nkMemory::StringView getAddressModeWAsString () const ;
95 nkMemory::StringView getComparisonFuncAsString () const ;
96
97 // Setters
106 virtual void setBorderColors (float r, float g, float b, float a) = 0 ;
112 virtual void setBorderColorR (float value) = 0 ;
118 virtual void setBorderColorG (float value) = 0 ;
124 virtual void setBorderColorB (float value) = 0 ;
130 virtual void setBorderColorA (float value) = 0 ;
137 virtual void setLodLevels (float min, float max) = 0 ;
143 virtual void setMaxAnisotropy (unsigned int value) = 0 ;
149 virtual void setMipMapBias (float value) = 0 ;
155 virtual void setFilterMethod (FILTER value) = 0 ;
161 virtual void setAddressModeU (TEXTURE_ADDRESS_MODE value) = 0 ;
167 virtual void setAddressModeV (TEXTURE_ADDRESS_MODE value) = 0 ;
173 virtual void setAddressModeW (TEXTURE_ADDRESS_MODE value) = 0 ;
179 virtual void setComparisonFunction (COMPARISON_FUNCTION value) = 0 ;
183 virtual void resetToDefault () = 0 ;
189 void setFilterMethodFromString (nkMemory::StringView value) ;
195 void setAddressModeUFromString (nkMemory::StringView value) ;
201 void setAddressModeVFromString (nkMemory::StringView value) ;
207 void setAddressModeWFromString (nkMemory::StringView value) ;
213 void setComparisonFuncFromString (nkMemory::StringView value) ;
214
215 // Import / Export
216 virtual void exportClassToTree (nkExport::Node* rootNode) override ;
217 virtual void importClassFromTree (nkExport::Node* rootNode) override ;
218
219 public :
220
221 // Statics
229 static nkMemory::UniquePtr<Sampler> create (System* system = nullptr) ;
230 } ;
231 }
nkGraphics::Sampler::setLodLevels
virtual void setLodLevels(float min, float max)=0
nkGraphics::Sampler::getBorderColorG
virtual float getBorderColorG() const =0
nkGraphics::System
Main interface with the component system.
Definition: System.h:14
nkGraphics::Sampler::setBorderColorB
virtual void setBorderColorB(float value)=0
nkGraphics::Sampler::getComparisonFunction
virtual COMPARISON_FUNCTION getComparisonFunction() const =0
nkGraphics::Sampler::setMipMapBias
virtual void setMipMapBias(float value)=0
nkGraphics::Sampler::getBorderColorB
virtual float getBorderColorB() const =0
nkGraphics::Sampler::getFilteringAsString
nkMemory::StringView getFilteringAsString() const
nkExport::Exportable
An interface to define objects that can be exported using this component.
Definition: Exportable.h:15
nkGraphics::Sampler::getAddressModeU
virtual TEXTURE_ADDRESS_MODE getAddressModeU() const =0
nkGraphics::Sampler::getAddressModeUAsString
nkMemory::StringView getAddressModeUAsString() const
nkGraphics::Sampler::setFilterMethod
virtual void setFilterMethod(FILTER value)=0
nkGraphics::Sampler::setAddressModeWFromString
void setAddressModeWFromString(nkMemory::StringView value)
nkGraphics::Sampler::getMipBias
virtual float getMipBias() const =0
nkGraphics::Sampler::create
static nkMemory::UniquePtr< Sampler > create(System *system=nullptr)
nkGraphics::Sampler::setAddressModeUFromString
void setAddressModeUFromString(nkMemory::StringView value)
nkGraphics::Sampler::setAddressModeU
virtual void setAddressModeU(TEXTURE_ADDRESS_MODE value)=0
nkGraphics::Sampler::setBorderColorR
virtual void setBorderColorR(float value)=0
nkGraphics::Sampler::~Sampler
virtual ~Sampler()
nkGraphics::Sampler::getAddressModeW
virtual TEXTURE_ADDRESS_MODE getAddressModeW() const =0
nkGraphics::Sampler::setMaxAnisotropy
virtual void setMaxAnisotropy(unsigned int value)=0
nkGraphics::Sampler::getAddressModeV
virtual TEXTURE_ADDRESS_MODE getAddressModeV() const =0
nkGraphics::Sampler::getBorderColorA
virtual float getBorderColorA() const =0
nkGraphics::Sampler::resetToDefault
virtual void resetToDefault()=0
nkGraphics::Sampler::setComparisonFuncFromString
void setComparisonFuncFromString(nkMemory::StringView value)
nkExport::Node
A node in the tree structure representing the data to export / import.
Definition: Node.h:42
nkGraphics::Sampler::setAddressModeVFromString
void setAddressModeVFromString(nkMemory::StringView value)
nkGraphics::Sampler::getMaxAnisotropy
virtual unsigned int getMaxAnisotropy() const =0
nkMemory::UniquePtr
Smart pointer owning the object instance it encapsulates.
Definition: UniquePtr.h:17
nkGraphics::Sampler::getBorderColorR
virtual float getBorderColorR() const =0
nkGraphics::Sampler::getAddressModeVAsString
nkMemory::StringView getAddressModeVAsString() const
nkMemory::StringView
Class holding information about a string, with no ownership over the data.
Definition: StringView.h:22
nkGraphics::Sampler::getMinLodLevel
virtual float getMinLodLevel() const =0
nkGraphics::Sampler::setFilterMethodFromString
void setFilterMethodFromString(nkMemory::StringView value)
nkGraphics::Sampler
Holds all the information needed of a sampler used during rendering.
Definition: Sampler.h:14
nkGraphics::Sampler::getFiltering
virtual FILTER getFiltering() const =0
nkGraphics::Sampler::setAddressModeW
virtual void setAddressModeW(TEXTURE_ADDRESS_MODE value)=0
nkGraphics::Sampler::getMaxLodLevel
virtual float getMaxLodLevel() const =0
nkGraphics::Sampler::importClassFromTree
virtual void importClassFromTree(nkExport::Node *rootNode) override
nkGraphics::Resource
Base class for a resource in the component.
Definition: Resource.h:12
nkGraphics::Sampler::setBorderColorA
virtual void setBorderColorA(float value)=0
nkGraphics::TEXTURE_ADDRESS_MODE
TEXTURE_ADDRESS_MODE
Available address mode for the samplers.
Definition: TextureAddressMode.h:12
nkGraphics::FILTER
FILTER
Available filtering methods a sampler can use, when magnifying or minifying during sampling.
Definition: Filter.h:12
nkGraphics::Sampler::getAddressModeWAsString
nkMemory::StringView getAddressModeWAsString() const
nkGraphics::Sampler::setBorderColorG
virtual void setBorderColorG(float value)=0
nkGraphics::Sampler::setBorderColors
virtual void setBorderColors(float r, float g, float b, float a)=0
nkGraphics::Sampler::setComparisonFunction
virtual void setComparisonFunction(COMPARISON_FUNCTION value)=0
nkGraphics::COMPARISON_FUNCTION
COMPARISON_FUNCTION
Available comparison functions available during sampling (for samplers, and depth stencil states).
Definition: ComparisonFunction.h:12
nkGraphics
Encompasses all API of component NilkinsGraphics.
Definition: BoundingBox.h:7
nkGraphics::Sampler::exportClassToTree
virtual void exportClassToTree(nkExport::Node *rootNode) override
nkGraphics::Sampler::setAddressModeV
virtual void setAddressModeV(TEXTURE_ADDRESS_MODE value)=0
nkGraphics::Sampler::getComparisonFuncAsString
nkMemory::StringView getComparisonFuncAsString() const